package com.baijia.authentication.principal;

import java.io.Serializable;

/**
 * @title Credentials
 * @desc 登录认证凭证，不同业务系统登录凭证不一定一样，内容可以是任何类型，如用户名密码组合；ip地址；cookie等
 * @author caoliang
 * @date 2015年12月5日
 * @version 1.0
 */
public abstract class Credentials implements Serializable {

    private static final long serialVersionUID = -1908841754578479781L;

    // 嘛方法也没有
    public final static String USER_NAME = "username";
    public final static String COUNTRY_CODE = "countryCode";
    public final static String PASSWORD = "password";
    public final static String USER_ROLE = "user_role";
    public final static String REMEMBER_ME = "remember_me";
    public final static String CODE = "code";
    public final static String APPID = "appId";
    public final static String APP_ID = "app_id";
    public final static String CAPTCHA_GUID = "captcha_guid";
    public final static String CAPTCHA = "captcha";
    public final static String NEED_CAPTCHA = "needCaptcha";

    private Boolean rememberMe = false;

    private Integer userRole;

    public abstract String getUsername();

    public abstract Integer getAccountType();

    public Boolean isRememberMe() {
        return rememberMe;
    }

    public void setRememberMe(Boolean rememberMe) {
        this.rememberMe = rememberMe;
    }

    public Integer getUserRole() {
        return userRole;
    }

    public void setUserRole(Integer userRole) {
        this.userRole = userRole;
    }
}